package com.icangya.domain;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "user_points_record")
public class UserPointsRecord {//用户商城积分来源记录表

    private Long id;
    private String openId;//用户id
    private String pointsType;//获取积分类型（文本表示）
    private long pointsNum;//获取的积分数
    private Timestamp pointsTime;//获取积分时间
    private int pointsTypec;//获取积分类型（数字表示）0：购买商品奖励，1：升级失败，获得积分奖励
    private long userId;//用户的id
    private String remark;//积分说明



    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "openid")
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Basic
    @Column(name = "points_type")
    public String getPointsType() {
        return pointsType;
    }

    public void setPointsType(String pointsType) {
        this.pointsType = pointsType;
    }
    @Basic
    @Column(name = "points_num")
    public long getPointsNum() {
        return pointsNum;
    }

    public void setPointsNum(long pointsNum) {
        this.pointsNum = pointsNum;
    }
    @Basic
    @Column(name = "points_time")
    public Timestamp getPointsTime() {
        return pointsTime;
    }

    public void setPointsTime(Timestamp pointsTime) {
        this.pointsTime = pointsTime;
    }
    @Basic
    @Column(name = "points_typec")
    public int getPointsTypec() {
        return pointsTypec;
    }

    public void setPointsTypec(int pointsTypec) {
        this.pointsTypec = pointsTypec;
    }
    @Basic
    @Column(name = "user_id")
    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }


    public UserPointsRecord() {
    }

    public UserPointsRecord(String openId, String pointsType, long pointsNum, Timestamp pointsTime, int pointsTypec, long userId, String remark) {
        this.openId = openId;
        this.pointsType = pointsType;
        this.pointsNum = pointsNum;
        this.pointsTime = pointsTime;
        this.pointsTypec = pointsTypec;
        this.userId = userId;
        this.remark = remark;
    }

}
